
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>上传</title>
    <%@include file= "/WEB-INF/pages/base/commImportPage.jsp" %>
    <script src="<%=rootPath%>/js/plupload/plupload.full.min.js" type="text/javascript"></script>
    <%--<script src="<%=rootPath%>/js/plupload/jquery.plupload.queue/jquery.plupload.queue.min.js" type="text/javascript"></script>--%>
    <script src="<%=rootPath%>/js/plupload/i18n/zh_CN.js" charset="UTF-8" type="text/javascript"></script>
    <%--<link rel="stylesheet" type="text/css" href="<%=rootPath%>/js/plupload/jquery.plupload.queue/css/jquery.plupload.queue.css">--%>
    <link rel="stylesheet" type="text/css" href="${resourcePath}/css/comm/base_v3.0.css">
    <link rel="stylesheet" type="text/css" href="${resourcePath}/css/comm/Package.css">
    <script src="<%=rootPath%>/js/pig/comm/myutil.js" type="text/javascript"></script>
    <script src="<%=rootPath%>/js/plupload/uploadFile.js" type="text/javascript"></script>

</head>
<body>
<div class="modal-body" style="height: 400px">
    <div id="filelist">
        <p>Your browser doesn't have Flash, Silverlight or HTML5 support.</p>
    </div>
    <div>
        <div class="dr-succc" style="width:94%;margin-left:3%">
            <div class="dr-succc">
                <p class="p-dr0">选择文件</p>
                <p class="p-dr1">将文件添加到上传队列以后，才能点击“上传文件”按钮。</p>
                <div class="dr-table">
                    <table cellpadding="0" cellspacing="0" id="filelistTable">
                        <tr>
                            <th>文件名</th>
                            <th><img src="${resourcePath}/images/guandaoqingli/folder.png" alt=""/>&nbsp;&nbsp;文件大小</th>
                            <th>上传进度</th>
                            <th>导入状态</th>
                        </tr>
                    </table>
                </div>
            </div>
        </div>
        <div class="dr-list"  style=";width:94%;margin-left:3%">
            <div id="container" style="text-align:right">
            <a id="pickfiles" href="javascript:void(0)" class="a1"></a>
            <a id="uploadfiles" href="javascript:void(0)" class="a2"></a>
            </div>
            <ul id="uploadSuccess" style="display: none">
                <li><em class="ok"></em><span>导入记录成功！</span></li>
            </ul>
            <ul name="importErr" style="display: none">
                <li><em class="no"></em><span>数据导入失败！共<i id="errNum">0</i>处错误,下载 <a href="javascript:void(0)" onclick=downErrM()>所有错误详情</a></span></li>
            </ul>
            <p name="importErr" class="error-info" style="display: none">错误详情</p>
            <div class="no-info" name="importErr" id="importErr" style="display: none">

            </div>
        </div>
    </div>
 </div>

    <%--<div class="modal-footer" style="text-align:center">--%>
        <%--<button class="btn btn-w100 btn-save-icon1 btn-h40" id="ddd" onclick="closeW()"><em style="top:10px;left:35px"></em>关闭</button>--%>
    <%--</div>--%>

<script type="text/javascript">
    $(document).ready(function(){
        initUp("container");
    });


    function showErrmessage(){
        $("#errDiv").toggle();
    }

    function closeW(){
        W.uploadDialog_.close();
    }
    window.parent.closeDialog=closeW;
    function downErrM(){
        var url=path+"/comm/LeadingIn/downExcelMessage.json";
        var ipt=$("<input name='html' value=''>").val($("#importErr").html());
        backgroundExportByForm.putDomToForm(ipt,url);
        backgroundExportByForm.submit();
    }

    function getlen(str1,str2){
        var sub = 0;
        if(str1.indexOf("导入模板错误") > 0)
        {
            sub = 1;
        }

        var r=new RegExp(str2,"gi");
        if(str1.match(r) != null)
        {
            return str1.match(r).length -sub ;

        }

        return 0;
    }
</script>
</body>
</html>
